﻿using System;
using System.Windows.Controls;

namespace FazaDemo.PL.Wpf
{
    class ContentBuildWorker : VisualBuildWorker
    {

        private readonly string _content;

        public ContentBuildWorker(string content)
        {
            _content = content;
        }

        protected override void FactoryInit()
        {
            if (_type == typeof(Label))
            {
                _factory = new LabelFactory(_content);
            }
            if (_type == typeof(RadioButton))
            {
                _factory = new RadioButtonFactory(_content);
            }
        }
    }
}